﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DoubanApi.Models
{
    [Serializable]
    public class MoviePreviewModel
    {

        public string Id { get; set; }

        string _Url = "";
        public bool AutoPalyer { get; set; }

        public string Url
        {
            get
            {
                if (AutoPalyer)
                {
                    _Url = _Url.Replace("auto=0","auto=1");
                }
                else
                {
                    _Url = _Url.Replace("auto=1","auto=0");
                }
                return _Url;
            }
            set
            {
                _Url = value;
            }
        }


        public override string ToString()
        {
            return Url;
        }
    }
}
